import logging

try:
    print('try....')
    r = 10 / 0
    print('result: ', r)
except ZeroDivisionError as e:
    logging.exception(e)
    print('except: ', e)
except ValueError as e:
    print('except: ', e)
# 如果没有错误发生，可以在except语句块后面加一个else，当没有错误发生时，会自动执行else语句：
else:
    print('no error or except')
finally:
    print('finally')
